<?php

$title = 'Home page';
$this->headTitle($title);
?>
<h1><?php echo $this->escapeHtml($title); ?></h1>
<p>
    <a href="<?php echo $this->url('base/album');?>">Albums</a>
</p>

<?php 

$js = $this->js();

//$jsCode = $js->Ext->hello[25]->hello2()['tree'][34][16]->hello3[$js->key]->World($js->test, $js->test2);
//$jsCode = $js->function($js->test, $js->test2)->_body($js->alert(123));
//$jsCode = $js->ID->hello->world;

/*$jsCode = $js->CodeContainer(array(
	$js->dowhile($js->Ex($js->test)->_neq(3))->_body($js->Ex($js->test)->_inc()),
	$js->while($js->Ex($js->test)->_neq(3))->_body($js->Ex($js->test)->_inc()),
	$js->if($js->Ex($js->x)->_eq(3)->_and($js->Brackets($js->Ex($js->test)->_neq('hello')->_or($js->Ex($js->test)->_eq(2)))))->_body($js->Ex($js->test)->_inc()),
	$js->elseif($js->Ex($js->test)->_neq(3))->_body(array($js->Ex($js->test)->_inc(), $js->Ex($js->test2)->_inc())),
	$js->else()->_body(array(
		$js->Ex($js->test)->_inc(),
		$js->if($js->Ex($js->x)->_eq(3)->_and($js->Brackets($js->Ex($js->test)->_neq('hello')->_or($js->Ex($js->test)->_eq(2)))))->_body($js->Ex($js->test)->_inc()),
	)),
	$js->Container(array(
		$js->try->_body($js->Ex($js->test)->_inc()),
		$js->catch($js->e)->_body($js->alert(123)),
	)),
	$js->for($js->ForCodeContainer(array($js->Ex($js->i)->_val(0), $js->Ex($js->i)->_lt(5), $js->Ex($js->i)->_inc())))->_body($js->alert($js->i)),
	$js->Object(array(
		'test1' => 'wqer',
		'test2' => 4,
		'test3' => array(
			'hello' => 'world',
			'my' => 'name',
			'date' => array(
				'year' => '2012',
				'month' => 11,
			),
		),
		'test4' => array(
			'hello' => 'world',
			'my' => 'name',
			'qwe' => array(
				'date' => array(
					'year' => '2012',
					'month' => 11,
				),
			'date2' => 1234,
			),
		),
	)),
	$js->TryCatch()->_tryBody($js->alert('try'))->_catchBody($js->alert('catch')),
));

$this->inlineScript()->appendScript($jsCode);*/

$jsD = clone $js;
$jsD->setDebug(True);

/*$jsCode = $jsD->Ex
	->_var($jsD->test)
	->_val($jsD->function()
		->_body($jsD->alert('Working'))->call($jsD->this)
	);*/

/*$jsCode = $js->test->_val($js->function()
			->_body($js->alert('Working good!'))->call($js->this));*/
//$jsCode = $js->test->my->script()->test[123][48]->_val(123, 0);
//$jsCode = $js->typeof($js->Response->handler)->_eq('function');

$jsCode = $js->Function->getPropertyAccessor('TEST');

print_r($jsCode);

$this->inlineScript()->appendScript($jsCode);
?>